from google.appengine.ext import db
import hashlib

class TwitterAuthdb(db.Model):
    UserName = db.StringProperty(required=True)
    UserPwdDigest = db.StringProperty(required=True)
    Token = db.StringProperty()
    Token_Secret = db.StringProperty()
    def toDigest(self, pwd):
        md5obj=hashlib.md5()
        md5obj.update(pwd)
        self.UserPwdDigest=md5obj.hexdigest()